﻿<template>

<!-- 标题页 -->
  <div class="detail">
     <div>
        <div id="column" >
            <img :src="activity.img" alt="">
            <div id="row">
                <div id="date">
                    <!-- 格式化日期 -->
                    <span>{{activity.riqi | ActivityRiqi}}</span>
                    <p>{{activity.statu}}</p>
                </div>
                <div id="text">
                    <h5>{{activity.atitle}}</h5>
                    <p>{{activity.descriptions}}</p>
                </div>
            </div>
        </div>
     </div>
  </div>  
</template>

<script> 
    // 引入moment组件 
    import moment from 'moment'
    
    export default {

        // 接收homeview组件传递的参数
    props:['activity'],


        // 过滤器  格式化日期
     filters:{
        ActivityRiqi(date){
            return moment(date).format('YYYY-MM-DD')
        }
     }
    }
    
</script>

<style lang="scss" scoped  src="../assets/detail.scss">

</style>